package com.songlanyun.modules.donationpoints.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import com.songlanyun.modules.donation.entity.DonationEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 公益积分捐赠
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-02 15:33:13
 */
@Data
@TableName("yxt_donation_points")
public class DonationPointsEntity extends RootEntity<Long, DonationPointsEntity> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;

    /**
     * 配置ID
     */
    @NotNull(message = "捐款项目不能为空")
    private Long configId;
    /**
     * 捐赠积分
     */
    private BigDecimal donationPoints;

    /**
     * 捐赠人ID
     */
    private Long donorId;
    /**
     * 捐赠时间
     */
    private Date donationTime;

    /**
     * 捐赠人真实姓名
     */
    @TableField(exist = false)
    private String realName;

    /**
     * 捐赠人手机号
     */
    @TableField(exist = false)
    private String mobile;

    @Override
    public Long getIdentity() {
        return this.getId();
    }
}
